package com.tudouji.project.purchasebill.mapper;

import com.tudouji.project.purchasebill.domain.Purchasebill;

import java.util.List;

/**
 * 采购单Mapper接口
 *
 * @author tudouji
 * @date 2022-04-11
 */
public interface PurchasebillMapper
{
    /**
     * 查询采购单
     *
     * @param guid 采购单ID
     * @return 采购单
     */
    public Purchasebill selectPurchasebillById(Long guid);
    public Purchasebill selectPurchasebillByGuid(String guid);
    public Purchasebill selectPurchasebillByCode(String guid);

    /**
     * 查询采购单列表
     *
     * @param purchasebill 采购单
     * @return 采购单集合
     */
    public List<Purchasebill> selectPurchasebillList(Purchasebill purchasebill);
    public List<Purchasebill> selectPurchasebillListPc(Purchasebill purchasebill);
    public List<Purchasebill> selectPurchasebillListMain(Purchasebill purchasebill);

    /**
     * 新增采购单
     *
     * @param purchasebill 采购单
     * @return 结果
     */
    public int insertPurchasebill(Purchasebill purchasebill);

    /**
     * 修改采购单
     *
     * @param purchasebill 采购单
     * @return 结果
     */
    public int updatePurchasebill(Purchasebill purchasebill);

    /**
     * 删除采购单
     *
     * @param guid 采购单ID
     * @return 结果
     */
    public int deletePurchasebillById(Long id);

    /**
     * 批量删除采购单
     *
     * @param guids 需要删除的数据ID
     * @return 结果
     */
    public int deletePurchasebillByIds(String[] guids);

    List<Purchasebill> selectPurchasebillPendingList(Purchasebill purchasebill);

    List<Purchasebill> selectPurchasebillsByDep(Purchasebill purchasebill);

    List<Purchasebill> selectPurchasebillsByUser(Purchasebill purchasebill);
    List<Purchasebill> selectPurchasebillsByDepPc(Purchasebill purchasebill);

    List<Purchasebill> selectPurchasebillsByUserPc(Purchasebill purchasebill);

    List<Purchasebill> getUnPayPurchasebillGroup(Purchasebill purchasebill);

    List<Purchasebill> getUnPayPurchasebills(Purchasebill purchasebill);
}
